Optimal. Leaf size=90 \[ -\frac {b (d \cos (e+f x))^m}{f m}-\frac {a (d \cos (e+f x))^{1+m} \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{d f (1+m) \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 91, normalized size of antiderivative = 1.01, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3596, 3567,
3857, 2722} \begin {gather*} -\frac {a \sin (e+f x) \cos (e+f x) (d \cos (e+f x))^m \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(e+f x)\right )}{f (m+1) \sqrt {\sin ^2(e+f x)}}-\frac {b (d \cos (e+f x))^m}{f m} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 3567
Rule 3596
Rule 3857
Rubi steps
\begin {align*} \int (d \cos (e+f x))^m (a+b \tan (e+f x)) \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x)) \, dx\\ &=-\frac {b (d \cos (e+f x))^m}{f m}+\left (a (d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} \, dx\\ &=-\frac {b (d \cos (e+f x))^m}{f m}+\left (a \left (\frac {\cos (e+f x)}{d}\right )^{-m} (d \cos (e+f x))^m\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^m \, dx\\ &=-\frac {b (d \cos (e+f x))^m}{f m}-\frac {a \cos (e+f x) (d \cos (e+f x))^m \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f (1+m) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.14, size = 203, normalized size = 2.26 \begin {gather*} \frac {(d \cos (e+f x))^m \left (-2 b \left (-2-m+m^2\right ) \, _2F_1\left (1,\frac {m}{2};1-\frac {m}{2};-e^{2 i (e+f x)}\right ) \sqrt {\sin ^2(e+f x)}+2 b m (1+m) \, _2F_1\left (1,\frac {2+m}{2};2-\frac {m}{2};-e^{2 i (e+f x)}\right ) \sqrt {\sin ^2(e+f x)} (\cos (2 (e+f x))+i \sin (2 (e+f x)))-a (-2+m) m \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(e+f x)\right ) \sin (2 (e+f x))\right )}{2 f (-2+m) m (1+m) \sqrt {\sin ^2(e+f x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.34, size = 0, normalized size = 0.00 \[\int \left (d \cos \left (f x +e \right )\right )^{m} \left (a +b \tan \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \cos {\left (e + f x \right )}\right )^{m} \left (a + b \tan {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\cos \left (e+f\,x\right )\right )}^m\,\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________